package com.shop.model.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.shop.model.entity.UserTb;
import com.shop.model.mapper.UserTbMapper;
import com.shop.model.service.IUserTbService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author shop
 * @since 2018-12-03
 */
@Service
public class UserTbServiceImpl extends ServiceImpl<UserTbMapper, UserTb> implements IUserTbService {
  @Autowired
   private  UserTbMapper userTbMapper;



    @Override
    public boolean updatePassword(String password,String userName) {
        boolean b = userTbMapper.updatePassword(password,userName);
        return b;
    }


    public List<UserTb> getUserList(String userName) {
        List<UserTb> userListByName = userTbMapper.getUserListByName(userName);
        for (UserTb userTb : userListByName) {
            System.out.println(userTb.getUserName());
        }
        return userListByName;
    }
}
